<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                template="../LayoutPadrao.xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="titulo">
        Lançamento
    </ui:define>

    <ui:define name="corpo">
        <h:outputStylesheet library="css" name="sistema.css" />
        <h:form id="frmLancamento">
            <p:messages id="messages" autoUpdate="true" closable="true" />
            <p:toolbar style="margin-top: 20px">
                <p:toolbarGroup>
                    <p:commandButton id="botaoSalvar" value="Salvar" action="#{lancamentoBean.salvar}" update="frmLancamento" />
                </p:toolbarGroup>
                <p:toolbarGroup align="right">
                    <p:button value="Pesquisar"  /><!--outcome="/lancamento/lancamentoPesquisa.xhtml-->
                </p:toolbarGroup>
            </p:toolbar>

            <p:panelGrid columns="2" id="painel" style="width: 100%; margin-top: 20px" columnClasses="rotulo, campo">
                <p:outputLabel value="Código" for="codigo" /> 
                <p:inputText id="codigo" size="20" value="#{lancamentoBean.lancamento.codigo}" readonly="true" />
                <p:outputLabel value="Data" for="dataLancamento" />
                <p:calendar id="dataLancamento" size="20" value="#{lancamentoBean.lancamento.dataLancamento}" pattern="dd/MM/yyyy" />
                <p:outputLabel value="Vencimento" for="dataVencimento" />
                <p:calendar id="dataVencimento" size="20" value="#{lancamentoBean.lancamento.dataVencimento}" pattern="dd/MM/yyyy" />
                <p:outputLabel value="Descrição" for="descricao" /> 
                <p:inputText id="descricao" size="50" value="#{lancamentoBean.lancamento.descricao}" />
            </p:panelGrid>
        </h:form>
    </ui:define>

</ui:composition>
